function showCal(obj) {
  if (!obj) var obj = event.srcElement;
  var obDate;
  if (obj.value == "") {
  	obDate = new Date();
  }
  else {
    var obList = obj.value.split("-");
	obDate = new Date(obList[0], obList[1]-1, obList[2]);
  }
  var retVal = showModalDialog("/include/calendar.htm", obDate,
		"dialogWidth=206px; dialogHeight=206px; help=no; scroll=no; status=no; ");

  if (typeof(retVal) != "undefined") {

	if (retVal=="") {
		obj.value = "";
	}
	else {
		var year = retVal.getFullYear();

		var month = retVal.getMonth()+1;	
		if (month < 10)
		  month = "0" + month;
		
		var day = retVal.getDate();
		if (day < 10)
		  day = "0" + day;

		obj.value =year + "-" + month + "-" + day;
	}

  }
}